package com.thinkgem.jeesite.modules.borrow.entity;

import com.thinkgem.jeesite.common.persistence.DataEntity;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;
import com.thinkgem.jeesite.modules.sys.utils.DictUtils;

import java.util.Date;

/**
 * 读者Entity
 * Created by liu_pc on 2015-10-29.
 */
public class BorrowLog extends DataEntity<BorrowLog>{
    private String logId;//流水编号
    private String doType;//操作类别（0：借出1：归还：2续借）
    private String rdId;//读者编号
    private String rdName;//读者姓名
    private String bkType;//图书种类（期刊，书籍,这个需要确定是不是需要做期刊）
    private String banId;//书籍编号
    private String bkName;//书籍名称
    private String doCnt; //操作数量
    private String doTime;//操作时间',
    private String rdSex;//性别（直接在数据库写汉字男女即可）
    private String zlId;//借出记录ID
    private String bkId;//书籍编号
    private String rdCardNo;//借书证号
    private String operator;//借书证号操作人员
    private String source;
    private Date rtnDate; //归还日期

    private String startTime;//查询开始时间
    private String endTime;//查询结束时间

    public BorrowLog(){

    }

    public BorrowLog(String doType, String rdId, String rdName, String bkType, String banId, String bkName, String doCnt,
                     String doTime, String zlId, String bkId, String operator){
        this.doType = doType;
        this.rdId = rdId;
        this.rdName = rdName;
        this.bkType = bkType;
        this.banId = banId;
        this.bkName = bkName;
        this.doCnt = doCnt;
        this.doTime = doTime;
        this.zlId = zlId;
        this.bkId = bkId;
        this.operator = operator;
    }

    public BorrowLog(String doType, String rdId, String rdName, String bkType, String banId, String bkName, String doCnt,
                     String doTime, String zlId, String bkId, String operator, Date rtnDate){
        this.doType = doType;
        this.rdId = rdId;
        this.rdName = rdName;
        this.bkType = bkType;
        this.banId = banId;
        this.bkName = bkName;
        this.doCnt = doCnt;
        this.doTime = doTime;
        this.zlId = zlId;
        this.bkId = bkId;
        this.operator = operator;
        this.rtnDate = rtnDate;
    }

    public String getId(){
        return id;
    }

    @ExcelField(title = "流水号", type = 1, align = 2, sort = 1)
    public String getLogId(){
        return logId;
    }

    public void setLogId(String logId){
        this.logId = logId;
    }

    public String getDoType(){
        return doType;
    }

    public void setDoType(String doType){
        this.doType = doType;
    }

    @ExcelField(title = "操作类别", type = 1, align = 2, sort = 2)
    public String getDoTypeName(){
        return DictUtils.getDictLabel(doType, "do_type", "借出");
    }

    @ExcelField(title = "借书证号", type = 1, align = 2, sort = 3)
    public String getRdCardNo(){
        return rdCardNo;
    }

    public void setRdCardNo(String rdCardNo){
        this.rdCardNo = rdCardNo;
    }

    public String getRdId(){
        return rdId;
    }

    public void setRdId(String rdId){
        this.rdId = rdId;
    }

    @ExcelField(title = "读者姓名", type = 1, align = 2, sort = 4)
    public String getRdName(){
        return rdName;
    }

    public void setRdName(String rdName){
        this.rdName = rdName;
    }

    @ExcelField(title = "图书种类", type = 1, align = 2, sort = 5)
    public String getBkType(){
        return bkType;
    }

    public void setBkType(String bkType){
        this.bkType = bkType;
    }

    @ExcelField(title = "书籍条码号", type = 1, align = 2, sort = 6)
    public String getBanId(){
        return banId;
    }

    public void setBanId(String banId){
        this.banId = banId;
    }

    @ExcelField(title = "书籍名称", type = 1, align = 2, sort = 7)
    public String getBkName(){
        return bkName;
    }

    public void setBkName(String bkName){
        this.bkName = bkName;
    }

    public String getDoCnt(){
        return doCnt;
    }

    public void setDoCnt(String doCnt){
        this.doCnt = doCnt;
    }

    @ExcelField(title = "操作时间", type = 1, align = 2, sort = 8)
    public String getDoTime(){
        return doTime;
    }

    public void setDoTime(String doTime){
        this.doTime = doTime;
    }

    public String getRdSex(){
        return rdSex;
    }

    public void setRdSex(String rdSex){
        this.rdSex = rdSex;
    }

    @ExcelField(title = "借出记录", type = 1, align = 2, sort = 10)
    public String getZlId(){
        return zlId;
    }

    public void setZlId(String zlId){
        this.zlId = zlId;
    }

    public String getBkId(){
        return bkId;
    }

    public void setBkId(String bkId){
        this.bkId = bkId;
    }

    @ExcelField(title = "操作人", type = 1, align = 2, sort = 9)
    public String getOperator(){
        return operator;
    }

    public void setOperator(String operator){
        this.operator = operator;
    }

    public Date getRtnDate(){
        return rtnDate;
    }

    public void setRtnDate(Date rtnDate){
        this.rtnDate = rtnDate;
    }

    public String getSource(){
        return source;
    }

    public void setSource(String source){
        this.source = source;
    }

    public String getStartTime(){
        return startTime;
    }

    public void setStartTime(String startTime){
        this.startTime = startTime;
    }

    public String getEndTime(){
        return endTime;
    }

    public void setEndTime(String endTime){
        this.endTime = endTime;
    }
}
